<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Vote
 * @copyright  Copyright 2011 KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 * @version    $Id: item-details.tpl 2011-03-09 01:11:30 idris $
 * @author     Idris
 */
?>

<div class="stats">
	<?php if (isset($this->object->comment_count) && $this->object->comment_count > 0): ?>
		<?php echo $this->translate( array('%s comment', '%s comments', $this->object->comment_count), $this->object->comment_count); ?>
	<?php endif; ?>

	<?php if (isset($this->object->view_count) && $this->object->view_count > 0): ?>
		<?php echo $this->translate( array('%s view', '%s views', $this->object->view_count), $this->object->view_count); ?>
	<?php endif; ?>

  <?php if (method_exists($this->object, 'likes')): ?>
    <?php
      $like_count = $this->object->likes()->getLikeCount();
      if ($like_count):
    ?>
      <?php echo $this->translate( array('%s like', '%s likes', $like_count), $like_count); ?>
    <?php endif; ?>
  <?php endif; ?>
</div>

<?php if ($this->object->getType() != 'user'): ?>
  <div class="author">
		<?php $owner = $this->object->getOwner(); ?>
		<?php echo $this->translate('Posted by %s at %s', $this->htmlLink($owner->getHref(), $owner->getTitle()), $this->timestamp($this->object->creation_date)); ?>
  </div>
<?php endif; ?>